package interview;

public class SelectTest {
    public static void main(String[] args) {

        Thread.currentThread().setName("mainThread");
        System.out.println(Thread.currentThread().getName());
        Thread1 myThread = new Thread1();
        myThread.setName("myThread");
        myThread.start();
    }
}

class Thread1 extends Thread{
    public Thread1() {
        System.out.println(Thread.currentThread().getName());
    }

    @Override
    public void run() {
        System.out.println(Thread.currentThread().getName());
    }
}
